import React from 'react'
import { Row, Col } from 'antd';
import {connect} from 'dva';
@connect(({cooperativeStore})=>({
  list: cooperativeStore.list
}))

class ListSubTabOne extends React.Component{
  state = {
    baseInfo:{},
  };
  
  componentDidMount(){
    const { dispatch } = this.props;

    const paramsString = location.search.slice(1);
    const searchParams = new URLSearchParams(paramsString)
    const BasicInfoId = searchParams.get('BasicInfoId')  
    // console.log(BasicInfoId);

    dispatch({
        type: 'cooperativeStore/queryBasicInfo',
        payload:{
            data:{
                "id":BasicInfoId
              }
        }
    }).then(res => {
        if(res.code==200){
          // console.log("基本信息内容：",res)
            this.setState({
              baseInfo:res.data,
            })
        }
    });
}

    render(){
        return(
            <div>
                <Row gutter={[6, 35]}>
                  <Col className="gutter-row" span={2} offset={2}>
                    <div>服务名称</div>
                  </Col>
                  <Col span={15}>
                      <div>{this.state.baseInfo.resourcesName}</div>
                  </Col>
                  
                </Row>
                <Row gutter={[6, 35]}>
                  <Col className="gutter-row" span={2} offset={2}>
                    <div>服务类型</div>
                  </Col>
                  <Col span={8}>
                      <div>{this.state.baseInfo.resourcesType}</div>
                  </Col>
                </Row>
                <Row gutter={[6, 35]}>
                    <Col className="gutter-row" span={2} offset={2}>
                      <div>服务机场</div>
                    </Col>
                    <Col>
                      <div>{this.state.baseInfo.serviceAirport}</div>
                    </Col>
                </Row>
                <Row gutter={[6, 35]}>
                    <Col className="gutter-row" span={2} offset={2}>
                      <div>服务航司</div>
                    </Col>
                    <Col>
                      <div>{this.state.baseInfo.serviceAirlineCompany}</div>
                    </Col>
                </Row>
                <Row gutter={[6, 35]}>
                <Col className="gutter-row" span={2} offset={2}>
                      <div>运输类型</div>
                    </Col>
                    <Col>
                      <div>零担</div>
                    </Col>
                </Row>
                <Row gutter={[6, 35]}>
                <Col className="gutter-row" span={2} offset={2}>
                      <div>车辆类型</div>
                    </Col>
                    <Col>
                      <div>常规</div>
                    </Col>
                </Row>
                <Row gutter={[6, 35]}>
                <Col className="gutter-row" span={2} offset={2}>
                      <div>生效时间</div>
                    </Col>
                    <Col>
                      <div>{this.state.baseInfo.cooperateStartTime}</div>
                    </Col>
                </Row>
                <Row gutter={[6, 35]}>
                <Col className="gutter-row" span={2} offset={2}>
                      <div>失效时间</div>
                    </Col>
                    <Col>
                      <div>{this.state.baseInfo.cooperateEndTime}</div>
                    </Col>
                </Row>
            </div>
        )
    }
}
export default ListSubTabOne